package com.clz.test;

import java.util.Arrays;

public class T3 {
    public static void main(String[] args) {
        int[] num={1,2,3,4,5,6,7,8};
        num= Arrays.copyOf(num, num.length*2);
        System.out.println("扩容后长度:"+num.length);
        System.out.println("扩容后内容如下");
        for (int i = 0; i < num.length; i++) {
            System.out.print(num[i]+",");
        }
    }
}
